package com.avilyne.database;

import java.sql.Statement;

import com.avilyne.rest.model.Result;

public class UserManage extends DbBean {
	public Result sendFeedBack(int userId,String userName, String content) {
		Result result = new Result();

		String sql = "INSERT INTO `android_book`.`feed_back` (`message`, `time_stamp`, `user_id`,`user_name`) VALUES ('%s', '%s', '%s','%s');";
		sql = String.format(sql, content + "", System.currentTimeMillis() + "", userId + "", userName);
		connectiondb();
		try {
			connectiondb();
			Statement stmt = con.createStatement();
			stmt.execute(sql);
			con.close();
			result.result = true;
		} catch (Exception ex) {
			System.out.println(ex.toString());
			result.result = false;
			result.message = ex.getMessage();
		} finally {
		}
		return result;
	}
}
